file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/libraries/protocol/include DESTINATION ${CMAKE_BINARY_DIR}/ FOLLOW_SYMLINK_CHAIN)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/libraries/protocol)

add_custom_target(combined
        COMMAND ${CMAKE_AR} -x $<TARGET_FILE:protocol>
        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/obj
        COMMAND ${CMAKE_AR} -qcs ${weila_sdk_lib} ${CMAKE_BINARY_DIR}/obj/*.o*
        DEPENDS protocol)